<template>
	<view class="w-670">

		<scroll-view scroll-y="true">
			<view>
				<template v-for="(i, index) in fmd">
					<navigator :url="'../t-fundDetail/t-fundDetail?code='+i.code"   :key="index">
						<view class="flex justify-between padding-top padding-bottom bd-b">
							<view class="basis-sm">
								<view class="color-f3 fs-40 text-bold">{{i.pre}}%</view>
								<view class=" fs-24 color-d1 pd-t">七日年化收益率</view>
							</view>
							<view class="flex  justify-around basis-xl">
								<view class="">
									<view class=" fs-32 text-bold">{{i.name}}</view>
									<view class=" fs-24 color-d1 pd-t">灵活申赎 · 低风险</view>
								</view>
								<view :class="[i.tag? 'cu-tag line-orange':'zwf']">
									<text>{{i.tag}}</text>
								</view>
							</view>
						</view>
					</navigator>
				</template>
			</view>
		</scroll-view>



		<view class="text-center footer">加载更多...</view>

	</view>
</template>

<script>
	import {
		createNamespacedHelpers
	} from 'vuex';
	const {
		mapActions,
		mapState
	} = createNamespacedHelpers('product')
	export default {
		data() {
			return {
				list: [{
						pre: '2.98%',
						name: '浦银日日丰货币',
						tag: '人气基金'
					},
					{
						pre: '1.18%',
						name: '浦银日日丰货币',
						tag: '支持快赎'
					},
					{
						pre: '3.28%',
						name: '浦银日日丰货币',
						tag: '闲钱投资'
					},
					{
						pre: '4.08%',
						name: '浦银日日丰货币',
						tag: ''
					},
					{
						pre: '4.08%',
						name: '浦银日日丰货币',
						tag: '支持快赎'
					},
					{
						pre: '4.08%',
						name: '浦银日日丰货币',
						tag: ''
					},
					{
						pre: '4.08%',
						name: '浦银日日丰货币',

					},
					{
						pre: '4.08%',
						name: '浦银日日丰货币',
						tag: '闲钱投资'
					},
				]
			}
		},
		computed: {
			...mapState(['fmd'])
		},
		methods: {
			...mapActions(['getFundMoney'])

		},
		onLoad() {
		this.getFundMoney()
		
			// uni.request({
			// 	url: 'http://182.92.101.230:8080/product/fund/currency',
			// 	success(res) {
			// 		console.log(res)
			// 	}
			// })
		}
	}
</script>
<style>
	page {
		background-color: #FFFFFF;
	}
</style>
<style scoped lang="scss">
	.w-15 {
		width: 15%;
	}

	.color-d1 {
		color: #D1D1D1;
	}

	.color-f3 {
		color: #FF3A3A;
	}

	.pd-t {
		padding-top: 10rpx;
	}

	.fs-40 {
		font-size: 40rpx;
	}

	.bd-b {
		border-bottom: 1px solid #E6E6E6;
	}

	.zwf {
		width: 120rpx;
		border: 1px solid white;
	}

	.footer {
		font-size: 20rpx;
		color: #999999;
		margin-top: 50rpx;
	}
</style>
